package com.black.system.domain.req.system.query;

import cn.hutool.core.util.StrUtil;
import com.black.common.core.domain.page.PageAbstructReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * @author L
 */
@Getter
@Setter
@ApiModel(value = "SysNoticeQueryReq", description = "通知公告表查询请求对象")
public class SysNoticeQueryReq extends PageAbstructReq {

    @ApiModelProperty(value = "通知标题", position = 1)
    private String noticeTitle;

    @ApiModelProperty(value = "操作人员", position = 2)
    private String createBy;

    @ApiModelProperty(value = "公告类型（1通知 2公告）", position = 3)
    private String noticeType;

    @ApiModelProperty(hidden = true)
    @Override
    public String getOrderBy() {
        if (StrUtil.isNotBlank(super.getOrderByColumn())) {
            return super.getOrderByColumn() + " " + super.getIsAsc();
        }
        return null;
    }
}
